package com.heima.wemedia.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmMaterialDto;
import com.heima.model.wemedia.pojos.WmMaterial;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface WmMaterialService extends IService<WmMaterial> {
    /**
     * 上传素材
     * @param multipartFile
     * @return
     */
    ResponseResult uploadPicture(MultipartFile multipartFile) throws IOException;

    /**
     * 素材列表查询
     * @param dto
     * @return
     */
    ResponseResult findList(WmMaterialDto dto);

    /**
     * 删除图片
     * @param id
     * @return
     */
    ResponseResult deletePicture(Integer id);

    /**
     * 收藏或者取消收藏
     *
     * @param type
     * @param id
     * @return
     */
    ResponseResult cancelCollect(Short type, Integer id);
}
